package com.baiwei.vpnapi.entity.reqentity;

import com.baiwei.vpnapi.exception.BusinessEnum;
import com.baiwei.vpnapi.exception.VpnException;

/**
 * @program: vpnapi
 * @description: vpn配置接口输入
 * @author: Mr. Stone
 * @create: 2020-02-29 09:19
 **/
public class VpnconfigInput implements Validatable {
    public VpnconfigInput(Integer serverId) {
        this.serverId = serverId;
    }

    public VpnconfigInput(){}

    public Integer getServerId() {
        return serverId;
    }

    public void setServerId(Integer serverId) {
        this.serverId = serverId;
    }

    /*
    * 服务器ip
    * */
    private Integer serverId;

    @Override
    public void validation() {
        if(serverId == null) {
            throw new VpnException(BusinessEnum.VPN_SERVER_ID_EMPTY);
        }
    }
}
